<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<%@page import="com.yaodian100.core.common.utils.ServerValue"%><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<link rel="stylesheet" href="/css/share.css" type="text/css" media="screen,print" />

<script language="javascript">
$().ready(function(){

	$("#loginMail_${tp}").click(function(){
		var userName = jQuery.trim($("#sn").val());
		var password = jQuery.trim($("#pswarea").val());
		$("#snTip").hide();	
		$("#pwTip").hide();	
		var isCorrect = true;
		if(userName.match(/.+@.+\..+/)==null||userName==""){
			$("#snTip").show();
			isCorrect = false;	
		}
		if (password==""){
			$("#pwTip").show();
			isCorrect = false;	
		}	
		if(isCorrect == true){	
			
			$.ajax({
			    url: "<%=ServerValue.getFrontContextPath()%>/sharing/getFriendList.do",
			    type: "post",
			    dataType: "json",
			    data: {userName:userName,password:password,tp:'${tp}'},
			    cache: false,
			    beforeSend: function(xhr) {			    
				    	    
			    	var loadingHtml = "<div class=\"loadingbox\">"+
			    	"<ul>"+
			         "<li class=\"c-align\"><img alt=\"loading\" src=\"/images/share/loading.gif\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>"+
			          "<li class=\"c-align\">联系人资料加载中，请稍候后...&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>"+
			    	"</ul>"+
			    	"</div>";
			    	openDialogById("分享／通知朋友：资料加载中",loadingHtml,540,400,"loaging");
			    	closeDialog();	
			    },
			    success: function( result ){				
			    	$.post("<%=ServerValue.getFrontContextPath()%>/sharing/fList.do",{friendStr:result,tp:'${tp}'},
			    			function( resultx ){
			    		closeDialog("loaging");
				    	openDialogById("分享／通知朋友：联系人清单",resultx,600,'auto',"listing");	
				    	
			    	});
			    		    	
			    	
				}
			});
		}

	});


});
</script>
</head>
<body>
<div class="loginbox">
<h2>邮箱登录</h2>
<ul>
      <li>
         <div class="logobox">
         		<div class="logox"><img width="73" height="35" alt="" src="/images/share/${tp}.gif"></div>
              <div class="titletxt">请输入您的邮箱账号密码导入朋友名单，<br>选择待邀请人并发送邀请邮件。</div>
         </div>
      </li><li><img alt="" src="/images/share/line.gif"></li>
      <li><strong>您的电子邮箱:</strong><span class="spacing"><input type="text" value="" style="width: 150px;" id="sn" name="emailarea"></span><span id="snTip" class="msg rn" style="display:none">错误的电子邮箱</span></li>
      <li><strong>您的邮箱密码:</strong><span class="spacing"><input type="password" value="" style="width: 150px;" id="pswarea" name="pswarea"></span><span id="pwTip" class="msg rn" style="display:none">请输入邮箱密码</span></li>
       <div class="bt-box3"><a title="确定" class="yes" href="javascript:;" id="loginMail_${tp}"></a></div>
      <li class="c-align">我们不会记录您的帐号和密码，<br>更不会未经允许向您的朋友发送邮件。</li>
</ul>
      <p class="bmloc"><img alt="" src="/images/share/bg_bottom384.gif"></p>
</div>



</body>

</html>